<?php

namespace App\Enums;

use App\Traits\EnumTrait;

class UserStatusEnum
{
    use EnumTrait;

//    const WAIT_AUDIT = ['status' => 0, 'text' => "待审核"];
    const PASS_AUDIT = ['status' => 1, 'text' => "正常"];
//    const FAIL_AUDIT = ['status' => 2, 'text' => "审核失败"];
    const FORBIDDEN = ['status' => 3, 'text' => "禁用"];
    const QUIT = ['status' => 4, 'text' => "注销"];

    public static function getAllByStatus(): array
    {
        return array_column(self::getConstants(),"text",'status');
    }

    public static function getStatus($data)
    {
        return $data['status'];
    }

    public static function getText($data)
    {
        return $data['text'];
    }
}
